//新闻资讯详情
'use strict';
import React,{Component} from 'react';
import Header from '../common/header';
import styles from '../style/styles';
import WebView from 'react-native-webview'
import Util from '../common/util'
import {
    View,
    Text,
} from 'react-native';

export default class newsDetail extends Component{
    // 构造
      constructor(props) {
        super(props);
        // 初始状态
        this.state = {
            url:this.props.url
        };
      }
    render(){
        let params = this.props.route.params
        let url='http://jiayiapp.xyd.qushiyun.com/index.php?app=news&act=detail&aid='+params.aid+"&isFromApp=2"
        return(
            <View style={{flex:1}}>
                <Header navigation={this.props.navigation}  title={params.title}/>
                <WebView
                    style={{width:Util.size.width,height:100,flex:1,}}
                    source={{uri:url}}
                />
            </View>
        )
    }
}